
buildpath := "build"
GO=$(shell which go)
GOAGEN=$(shell which goagen)
designpath := "git.oschina.net/antlinker/antevent/server/design"
goaoutdir = server

antevent:
	mkdir -p $(buildpath)
	$(GO) build -v -i -o $(buildpath)/antevent ./cmd/antevent
app:
	$(GOAGEN) app -d $(designpath) -o $(goaoutdir)
swagger:
	$(GOAGEN) swagger -d $(designpath) -o $(goaoutdir)
main:
	$(GOAGEN) main -d $(designpath) -o $(goaoutdir)
ctrl:
	$(GOAGEN) controller -d $(designpath) -o $(goaoutdir)
cli:
	$(GOAGEN) client -d $(designpath) -o $(goaoutdir)

code: app swagger

tool:
	$(GO) install -v ./cmd/antevtool

build: code antevent tool


